<style>
.live-subscribe-a {
    width: auto;
	margin-right:0.2rem;
	padding:0 0.2rem;
}
.video-js {
    width: 100%;
    height: 100%;
}
</style>
<div id="my-videoblock" class="swiper-wrapper block-video" style="margin-bottom:0.5rem">	
<video id="player" ng-poster="pagedata.room.image" autoplay="autoplay" class="video-js" width="100%" controls="controls" playsinline webkit-playsinline x5-video-player-type="h5-page">   
    <source ng-src="pagedata.info.url" type="application/x-mpegURL" />
</video>
</div>
<div ng-show="pagedata.room.hd==3">
<a ng-show="pagedata.room.now==1 " href="javascript:void(0);" ng-click="access_json('/room/main/hd=2&id='+pagedata.room.id)" class="live-subscribe-a live-subscribe-full-a">切换到高清</a>
<a ng-show="pagedata.room.now==2" href="javascript:void(0);" ng-click="access_json('/room/main/hd=2&id='+pagedata.room.id)" class="live-subscribe-a live-subscribe-full-a">切换到标清</a>
</div>
<a ng-show="pagedata.setting.open==1 && pagedata.info.status==1" href="javascript:void(0);" ng-click="access_json('/room/close/id='+pagedata.room.id)" class="live-subscribe-a live-subscribe-full-a">关闭直播</a>
<a ng-show="pagedata.setting.open==1 && pagedata.info.status!=1"  href="javascript:void(0);" ng-click="access_json('/room/open/id='+pagedata.room.id)" class="live-subscribe-a live-subscribe-full-a">开启直播</a>
<script>
function options(src){
            return {
                autoplay: true, // true,浏览器准备好时开始播放。
                muted: true, // 默认情况下将会消除音频。
                loop: true, // 导致视频一结束就重新开始。
                controls: false, //取消视频中的进度条
                preload: 'auto', // auto浏览器选择最佳行为,立即开始加载视频（如果浏览器支持）
                language: 'zh-CN',  //汉化
                fluid: true, // 当true时，将按比例缩放以适应其容器。
                sources: [{
                    type: 'application/x-mpegURL',
                    src  //视频播放地址
                }],
                notSupportedMessage: '此视频暂无法播放，请稍后再试', // 无法播放媒体源时显示的默认信息。
                textTrackDisplay: false,
            }
}
require(["videojs"], function(video) {
		console.log(scope.pagedata.info.url);
		window['videojs'] = video;
		var player = window.videojs("player", options(scope.pagedata.info.url), function(){
             this.on('play', function() {
                    console.log('正在播放');
             });
        }); 
});
</script>